
// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.15E2D0A3-22C3-BFBE-5B51-0CEACE667D49]
// </editor-fold> 
public class MevaPila implements Pila {

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.278B7C6C-DB15-4448-7ACC-92BC64E26B44]
    // </editor-fold>
    public node n;


    public MevaPila () {
        n=null;

    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C50CD378-6AFB-1144-E7E2-7757A8F32725]
    // </editor-fold> 
    public void apilar (node x) {
        if (n==null){
            n=x;
        }else {
            x.seguent=n;
            n = x;
        }

    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.64414132-9BE2-2D1E-9570-8834F20D2209]
    // </editor-fold> 
    public void desapilar () {

        n = n.seguent;
        
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.6F4C224C-AEC6-931F-72C7-2FE74577C912]
    // </editor-fold> 
    public String cim () {
        
             return n.valor;

    }

    public void apilar(Object x) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

   
}

